package bairui.international.console.web.controller.ticket.offset;

import com.lianjing.sh.spring.web.controller.enhance.module.Module;
import com.lianjing.sh.spring.web.controller.enhance.module.ModuleHead;
import com.lianjing.sh.spring.web.controller.enhance.module.body.AddModuleBody;

/**
 *
 * Module_Add
 *
 */
class Module_Add{

	
	public Module module(
		bairui.international.model.domain.jpa.TB_ElectronicTicketOrder bean
		, 
		C_Ticket_Offset_Add_Add.Add.Operate c_Ticket_Offset_Add_Add_Add_Operate
				
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return moduleTemplate(
				bean
				, 
				c_Ticket_Offset_Add_Add_Add_Operate
						
				,editors
			);
	}
	
	public Module module(
		java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketOrder> bean
		, 
		C_Ticket_Offset_Add_Add.Add.Operate c_Ticket_Offset_Add_Add_Add_Operate
				
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return moduleTemplate(
				bean
				, 
				c_Ticket_Offset_Add_Add_Add_Operate
						
				,editors
			);
	}
	
	public Module module(
	//	, 
	C_Ticket_Offset_Add_Add.Add.Operate c_Ticket_Offset_Add_Add_Add_Operate
			
	,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
	
	){
		Object bean = null;
		return moduleTemplate(
				bean
				, 
				c_Ticket_Offset_Add_Add_Add_Operate
						
				,editors
			);
	}
	
	/**
	 * 编辑模块
	 */
	private Module moduleTemplate(
		Object bean
		, 
		C_Ticket_Offset_Add_Add.Add.Operate c_Ticket_Offset_Add_Add_Add_Operate
				
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return
			new Module(
					new ModuleHead("添加")
					, 
					new AddModuleBody(
							bean, 
							Model.class,
							c_Ticket_Offset_Add_Add_Add_Operate, 
							Relation.relations(
								)
							,editors
						)
				);
	}
	
	/**
	 * 输入模型
	 */
	static public class Models {
		private @lombok.Getter @lombok.Setter java.util.List<Model> models = new java.util.ArrayList<>();
	}
	
	@org.springframework.stereotype.Component("bairui.international.console.web.controller.ticket.offset.Module_Add$Model")
	
	static public class Model
	
	 extends bairui.international.model.domain.jpa.TB_ElectronicTicketOrder
	
	 implements 
	
		com.lianjing.sh.spring.web.controller.enhance.input.InputModelable
	
	{
	
	
	
		/**
	
		 * 默认构造函数
	
		 */
	
		public Model(){}
	
	
	
		/**
	
		 * 构造函数
	
		 */
	
		public Model(
	
			bairui.international.model.domain.jpa.TB_ElectronicTicketOrder bean
	
		){
	
			if(null != bean){
	
				this.setName(bean.getName());
	
				this.setPrice(bean.getPrice());
	
				this.setCount(bean.getCount());
	
				this.setType(bean.getType());
	
				this.setExpiryDate(bean.getExpiryDate());
	
				this.setGiveFlag(bean.getGiveFlag());
	
				this.setOneuseFlag(bean.getOneuseFlag());
	
				this.setComment(bean.getComment());
	
			}
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("标题")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(1001)
	
		@org.hibernate.validator.constraints.NotBlank
	
		@javax.validation.constraints.Size(min=0, max=50)
	
		@Override
	
		public String getName() {
	
			return (String)super.getName();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("面值")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(2001)
	
		@javax.validation.constraints.NotNull
	
		@javax.validation.constraints.Max(Long.MAX_VALUE)
	
		@javax.validation.constraints.Min(0)
	
		@Override
	
		public Double getPrice() {
	
			return (Double)super.getPrice();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("数量")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(3001)
	
		@javax.validation.constraints.NotNull
	
		@javax.validation.constraints.Max(Long.MAX_VALUE)
	
		@javax.validation.constraints.Min(1)
	
		@Override
	
		public Long getCount() {
	
			return (Long)super.getCount();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("类型")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(4001)
	
		@javax.validation.constraints.NotNull
	
		@Override
	
		public bairui.international.model.type.Type_ElectronicTicket getType() {
	
			return (bairui.international.model.type.Type_ElectronicTicket)super.getType();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("有效期")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(5001)
	
		@javax.validation.constraints.NotNull
	
		@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd")
	
		@com.fasterxml.jackson.annotation.JsonFormat(pattern="yyyy-MM-dd")
	
		@Override
	
		public java.util.Date getExpiryDate() {
	
			return (java.util.Date)super.getExpiryDate();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("是否可赠送")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(6001)
	
		@javax.validation.constraints.NotNull
	
		@Override
	
		public Boolean getGiveFlag() {
	
			return (Boolean)super.getGiveFlag();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("是否一次性")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(7001)
	
		@javax.validation.constraints.NotNull
	
		@Override
	
		public Boolean getOneuseFlag() {
	
			return (Boolean)super.getOneuseFlag();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("备注")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(8001)
	
		@javax.validation.constraints.Size(min=0, max=500)
	
		@Override
	
		public String getComment() {
	
			return (String)super.getComment();
	
		}
	
		
	
	
	
		/**
	
		 * 非继承属性
	
		 */
	
	
	
		/**
	
		 * 得到输入属性
	
		 */
	
		/** 得到标题 */
	
		public String gainName() {
	
			return this.getName();
	
		}
	
		/** 得到面值 */
	
		public Double gainPrice() {
	
			return this.getPrice();
	
		}
	
		/** 得到数量 */
	
		public Long gainCount() {
	
			return this.getCount();
	
		}
	
		/** 得到类型 */
	
		public bairui.international.model.type.Type_ElectronicTicket gainType() {
	
			return this.getType();
	
		}
	
		/** 得到有效期 */
	
		public java.util.Date gainExpiryDate() {
	
			return this.getExpiryDate();
	
		}
	
		/** 得到是否可赠送 */
	
		public Boolean gainGiveFlag() {
	
			return this.getGiveFlag();
	
		}
	
		/** 得到是否一次性 */
	
		public Boolean gainOneuseFlag() {
	
			return this.getOneuseFlag();
	
		}
	
		/** 得到备注 */
	
		public String gainComment() {
	
			return this.getComment();
	
		}
	
	
	
		/**
	
		 * 转换到表单数据格式
	
		 */
	
		public java.util.Map<String, String> toFormData() throws com.sh_lianjing.serialize.json.jackson.exception.JsonException{
	
			return com.lianjing.sh.web.common.util.Util_Form.beanToFormDataFormat(this);
	
		}
	
	
	
	}
	
	
	
	static public class Relation
	{
		public static java.util.Map<String, java.util.List<?>> relations(
		){
			java.util.Map<String, java.util.List<?>> map = new java.util.HashMap<>();
			return map;
		}
	}
	
	
	
	/**
	 * 输出模型
	 */
	

}
